<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <title>Title</title>
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header"></div>
        <a href="#" class="navbar-brand">project name</a>
        <div id="navbar" class="collapse" navbar-collapse>
            <ul>
                <li></li>
                <li></li>
                <li></li>
            </ul>
        </div>
    </div>
</nav>

<span th:text="${resume}" style="color:#D02090"></span> 
<!--<span th:text="${userList}" style="color:#D02090"></span> -->
<br>
<!--<span th:text="${person.age}" style="color:#D02090"></span>-->
<br>
数据迭代
<tr th:each="person : ${userList}">
    <td th:text="${person.name}">tyrone</td>
    <td th:text="${person.age}">18</td>
    <br>
</tr> 
<br>
判断是否为空
<tr th:if="${resume.empty}">
    <td colspan="3">No messages</td>
</tr>
<br><br><br><br>
<div th:object="${person}">
    <p th:text="*{name}"></p>
    <p th:text="*{age}"></p>
</div>
<br>
<!--<p>相当于这个</p>-->
<span th:text="${person.age}" style="color:#D02090"></span>
<a th:href="@{/htmldemo.html}">aaa</a>
<p th:href="@{commons/htmldemo.html}"></p>
@{...}动态加载路径
<a href="../home.html" th:href="@{/htmldemo.html}">返回首页</a>
<script th:inline="javascript">
th:attrappend & th:attrprepend
th:attrappend和th:attrprepend可以将表达式的结果分别追加到指定的属性值之后和之前。

<button class="btn" th:attrappend="class=${outOfStock} ? ' enable' : ' disable'">购买</button>

<button class="btn" th:attrprepend="class=${outOfStock} ? 'enable ' : 'disable '">购买</button>
<br>
使用th:with属性可以定义局部变量：
</script>
    <p th:with="name='wjf'"><span th:utext="${name}"></span></p>
<script th:inline="javascript">
    var user = [[${person}]];
    alert("用户名：" + user.name);
</script>

</body>
</html>
